/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.com.minam.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pe.com.minam.beans.Noticia;
import pe.com.minam.daorepository.NoticiaDao;

/**
 *
 * @author Willian
 */
@Service
public class NoticiaService {

    @Autowired
    private NoticiaDao noticiaDao;

    public List<Noticia> getNoticiasParaPlugin() {
        return null;
    }

    public int insertOrUpdate(Noticia noticia) {
        try {
            noticiaDao.save(noticia);
            return 1;
        } catch (Exception ex) {
            return 0;
        }
    }
}
